package java033;

import java.util.*;
class Rectangle
{	private int width;
	private int length;
	
	public void setWidth(int width) {
		this.width = width;
	}
	public int getWidth() {
		return width;
	}

	public void setLength(int length) {
		this.length = length;
	}
	public int getLength() {
		return length;
	}
	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
	}

	public int getPerimeter(int width,int length)
	{
	 return (int)(2*(width+length));
	}
	public int getArea(int width,int length)
	{
		return (int)(width*length);
	}
	
}
class Circle
{	private int radius;
	public void setRadius(int radius) 
	{
	this.radius = radius;
	}

	public int getRadius() 
	{
	return radius;
	}

@Override
	public String toString() 
	{
		return "Circle [radius=" + radius + "]";
	}

	public Circle(int radius)
	{
		this.radius=radius;
	}

	public int getPerimeter(int radius)
	{
		return (int)(2*Math.PI*radius);
	}
	public int getArea(int radius)
	{
	return (int)(Math.PI*radius*radius);
	}
	
}
public class Main 
{
	public static void main(String[] args) 
	{Scanner sc=new Scanner(System.in);
	Rectangle[] R=new Rectangle[2];
	Circle[] C=new Circle[2];
	int sumPerimeter1=0;int sumArea1=0;
	int sumPerimeter2=0;int sumArea2=0;
	for(int i=0;i<2;i++)
		{
		R[i]=new Rectangle(sc.nextInt(),sc.nextInt());
		sumPerimeter1=sumPerimeter1+R[i].getPerimeter(R[i].getWidth(), R[i].getLength());
		sumArea1=sumArea1+R[i].getArea(R[i].getWidth(), R[i].getLength());
		}
	
	for(int j=0;j<2;j++)
		{
		C[j]=new Circle(sc.nextInt());
		sumPerimeter2=sumPerimeter2+C[j].getPerimeter(C[j].getRadius());
		sumArea2=sumArea2+C[j].getArea(C[j].getRadius());
		}
	System.out.println(sumPerimeter1+sumPerimeter2);
	System.out.println(sumArea1+sumArea2);
	System.out.println(Arrays.deepToString(R));
	System.out.println(Arrays.deepToString(C));   
	}
}
